Conversation
ab92aa4 to
a1967fd
Compare
d5d906a to
7197492
Compare
|
Hi @blasten could you take a look at this? I'm trying to add |
There was a problem hiding this comment.
We are very sensitive to adding dependencies to the embedding. This can cause conflict in the future if a plugin adds this dependency.
Since you are returning a String, is there any chance you can remove the dependency and return the raw string?
justinmc
left a comment
There was a problem hiding this comment.
LGTM. Take a look at my comment about fields, otherwise just nitpicks. 👍
There was a problem hiding this comment.
Could this method be static?
There was a problem hiding this comment.
There are two declarations of fields above, maybe some code got mixed up or missed being deleted.
404cffa to
a1f3344
Compare
a1f3344 to
480f843
Compare
There was a problem hiding this comment.
| for (int i = 0; i < 16; i++) matrix[i] = jsonMatrix.getDouble(i); | |
| for (int i = 0; i < 16; i++) { | |
| matrix[i] = jsonMatrix.getDouble(i); | |
| } |
There was a problem hiding this comment.
nit: it might be a bit more readable if you do:
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
return hint;
}
// then switch There was a problem hiding this comment.
| if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) | |
| afm = view.getContext().getSystemService(AutofillManager.class); | |
| else afm = null; | |
| afm = Build.VERSION.SDK_INT >= Build.VERSION_CODES.O ? view.getContext().getSystemService(AutofillManager.class) : null; |
There was a problem hiding this comment.
SDK version check doesn't seem to work with ternary expressions, the linter started complaining when I applied the suggested change.
There was a problem hiding this comment.
| if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) return; | |
| if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) { | |
| return; | |
| } |
There was a problem hiding this comment.
| if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) return; | |
| if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) { | |
| return; | |
| } |
There was a problem hiding this comment.
| if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) return; | |
| if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) { | |
| return; | |
| } |
There was a problem hiding this comment.
I realized the code is missing braces in a few places. The Google style guide for Java suggests that braces are used even if there's only a single statement: https://google.github.io/styleguide/javaguide.html#s4.1.1-braces-always-used
There was a problem hiding this comment.
Thank you for reviewing this!
There was a problem hiding this comment.
All missing braces should be added now. Does the updated code look good to you?
435ac06 to
0ca379f
Compare
Framework PR: flutter/flutter#52126